package com.dianping.cat.alarm.server.transform;

import com.dianping.cat.alarm.server.entity.Condition;
import com.dianping.cat.alarm.server.entity.Rule;
import com.dianping.cat.alarm.server.entity.ServerAlarmRuleConfig;
import com.dianping.cat.alarm.server.entity.SubCondition;
import java.util.ArrayList;
import java.util.List;

public class DefaultLinker implements ILinker {
  private boolean m_deferrable;

  public DefaultLinker(boolean deferrable) {
/* 14 */     this.m_deferedJobs = new ArrayList();


/* 17 */     this.m_deferrable = deferrable;
  }
  private List<Runnable> m_deferedJobs;
  public void finish() {
/* 21 */     for (Runnable job : this.m_deferedJobs) {
/* 22 */       job.run();
    }
  }


  public boolean onCondition(Rule parent, Condition condition) {
/* 28 */     parent.addCondition(condition);
/* 29 */     return true;
  }


  public boolean onRule(ServerAlarmRuleConfig parent, Rule rule) {
/* 34 */     parent.addRule(rule);
/* 35 */     return true;
  }


  public boolean onSubCondition(Condition parent, SubCondition subCondition) {
/* 40 */     parent.addSubCondition(subCondition);
/* 41 */     return true;
  }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-alarm-3.0.0.jar!/com/dianping/cat/alarm/server/transform/DefaultLinker.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */